package com.example.reggie.controller;

import org.springframework.web.bind.annotation.ModelAttribute;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

public class BaseController {
    public HttpSession session;
    public HttpServletResponse response;
    public HttpServletRequest request;
    public ServletContext application;

    @ModelAttribute
    private void set(HttpServletRequest request, HttpServletResponse response) {
        this.application = request.getServletContext();
        this.session = request.getSession();
        this.response = response;
        this.request = request;
    }
}
